//
//  Path.swift
//  ECApp
//
//  Created by 程平 on 2017/10/21.
//

import Foundation

enum Path :String {
    case base = "/"
    // 用户管理
    case login = "/login"
    case register = "/register"
    case getPwdBack = "/passwordRetake"
    case changePwd = "/user/savePassword"
    case logout = "/user/logout"
    case getUserInfo = "/user/searchUserInfo"
    // 产品
    case getProductTypes = "/index/searchProductCategory"
    case getProductsByTypeId = "/index/searchProductListByCategory"
    case getProduct = "/index/searchProductDetail"
     case getProperiesByProductId = "/index/searchPropertys"
    // 首页接口
    case getHomeProductsByTypeId = "/index/searchHomeProductList"
    case getHomeBanner = "index/listHomeImg"
    
    // 地址管理
    case getAddressList = "/user/searchAddressList"
    case getAddAdress = "/user/createAddress"
    case updateAdress = "/user/updateAddress"
    case deleteAdress = "/user/deleteAddress"
    case setDefaultAdress = "/user/resetDefaultAddress"
    case getDefaultAdress = "/user/searchDefaultAddress"
    
    // 订单管理
    case createOrder = "/transaction/placeOrder"
    case getOrdersByStatus = "/transaction/searchOdersByStatus"
    case applySalesReturn = "/transaction/applyRefund"
    
   
    static var authFreePaths:[Path]{
        return [.base,.login,.register,.getPwdBack]
    }
    static var authPaths:[String]{
        return ["/user/*","/index/*","/transaction/*"]
    }
}
